import 'package:json_annotation/json_annotation.dart';

part 'product_list_model.g.dart';


@JsonSerializable()
class ProductListModel extends Object {

  List<ProductItemModel> product_list;

  int? total;

  int errcode;

  String message;

  ProductListModel(this.product_list,this.total,this.errcode,this.message,);

  factory ProductListModel.fromJson(Map<String, dynamic> srcJson) => _$ProductListModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ProductListModelToJson(this);

}


@JsonSerializable()
class ProductItemModel extends Object {

  String shop_name;

  int product_id;

  String pic_thumb;

  String pic_url;

  String product_name;

  int check_status;

  int shop_id;

  int? suppliers_id;

  int? product_type;

  String? product_sn;

  String? product_price;

  String? market_price;

  int? product_status;

  int? is_best;

  int? is_new;

  int? is_hot;

  int? product_stock;

  int? sort_order;

  String? product_brief;

  List<ProductSku> product_sku;

  bool? is_collect;

  ProductItemModel(this.shop_name,this.product_id,this.pic_thumb,this.pic_url,this.product_name,this.check_status,this.shop_id,this.suppliers_id,this.product_type,this.product_sn,this.product_price,this.market_price,this.product_status,this.is_best,this.is_new,this.is_hot,this.product_stock,this.sort_order,this.product_brief,this.product_sku,this.is_collect,);

  factory ProductItemModel.fromJson(Map<String, dynamic> srcJson) => _$ProductItemModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ProductItemModelToJson(this);

}


@JsonSerializable()
class ProductSku extends Object {

  int sku_id;

  int product_id;

  String sku_value;

  List<Sku_data> sku_data;

  String sku_sn;

  int sku_stock;

  String sku_tsn;

  String? sku_price;

  ProductSku(this.sku_id,this.product_id,this.sku_value,this.sku_data,this.sku_sn,this.sku_stock,this.sku_tsn,this.sku_price,);

  factory ProductSku.fromJson(Map<String, dynamic> srcJson) => _$ProductSkuFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ProductSkuToJson(this);

}


@JsonSerializable()
class Sku_data extends Object {

  String name;

  String value;

  Sku_data(this.name,this.value,);

  factory Sku_data.fromJson(Map<String, dynamic> srcJson) => _$Sku_dataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$Sku_dataToJson(this);

}


@JsonSerializable()
class Filter extends Object {

  int is_show;

  int page;

  int size;

  String sort_field;

  String sort_order;

  int product_id;

  int is_delete;

  int category_id;

  int brand_id;

  int shop_id;

  String intro_type;

  int coupon_id;

  int shop_category_id;

  int with_cart_sum;

  int product_status;

  Filter(this.is_show,this.page,this.size,this.sort_field,this.sort_order,this.product_id,this.is_delete,this.category_id,this.brand_id,this.shop_id,this.intro_type,this.coupon_id,this.shop_category_id,this.with_cart_sum,this.product_status,);

  factory Filter.fromJson(Map<String, dynamic> srcJson) => _$FilterFromJson(srcJson);

  Map<String, dynamic> toJson() => _$FilterToJson(this);

}


